/* Intervall.h
 *
 *	Copyright (C) 2008 CRIMERE
 *	Copyright (C) 2008 Jean-Marc Mercier
 *	
 *	This file is part of OTS (optimally transported schemes), an open-source library
 *	dedicated to scientific computing. http://code.google.com/p/optimally-transported-schemes/
 *
 *	CRIMERE makes no representations about the suitability of this
 *	software for any purpose. It is provided "as is" without express or
 *	implied warranty.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 */
#ifndef _OSInterval_
#define _OSInterval_
/*	Defines intervall class. 
	Actually this is a simple proxy to boost::numeric::intervall classes.
*/
#include <boost/numeric/interval.hpp>
#include <iostream>
#include <math.h>

using namespace boost::numeric::interval_lib;
using namespace boost::numeric;

/*typedef interval<double> I1_aux;
typedef unprotect<I1_aux>::type OSInterval;*/

/*! \brief	definition of intervall classes

	this is just a proxy to boost::numeric::interval. We use the boost semantic.
*/
typedef interval<double,
                   policies<save_state<rounded_transc_opp<double> >,
                            checking_base<double> > > OSInterval;
/*! \brief	serialization of intervals.
*/
template<class T, class Policies>
std::ostream &operator<<(std::ostream &os,
                         const boost::numeric::interval<T, Policies> &x) {
  os << "[" << x.lower() << ", " << x.upper() << "]";
  return os;
};



#endif
